package com.lagou.myrpcconsumer.server;

import com.lagou.myrpcconsumer.proxy.RpcClientProxy;
import com.lagou.rpc.api.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServer {
    @Autowired
    private RpcClientProxy rpcClientProxy;

    /**
     * 创建代理对象
     * @return
     */
    public IUserService getIUserService(){
        return (IUserService) rpcClientProxy.createProxy(IUserService.class);
    }
}
